;$(function() {
	$("div.ac_select_user").click(function(e) {
		var t = $(e.target);
		if(!t.is(":checkbox") && !t.is("a")) {
			var c = $(this).find(":checkbox").get(0);
			c.checked = !c.checked;
		}
	});
	$.subscribe("click_follow_all",__followall,false);
	function __followall(t,e,action) {
		t = $(t);
		var arr = [];
		$("input.follow_selector").each(function() {
			if(this.checked) {
				arr.push(this.value);
			}
		});
		if(arr.length) {
			$.getJSON(t.attr("srv") + arr.join(',') , function(d) {
				if(d.code == 0) {
					t.notice('<div style="width:100px;">关注成功</div>');
				} else {
					t.notice('<div style="width:100px;">关注失败</div>');
				}
			});	
		} else {
			t.notice("<div style='width:150px;'>请选择要关注的用户</div>");
		}
	}
});